package com.xl98.service.impl;

import com.xl98.entity.Article;
import com.xl98.mapper.ArticleMapper;
import com.xl98.service.ArticleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ls
 * @since 2020-05-15
 */
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {
    @Autowired
    private ArticleMapper articleMapper;
    @Override
    public int addArticle(Article article) {
        return articleMapper.insert(article);
    }

    @Override
    public int updateArticle(Article article) {
        return articleMapper.updateById(article);
    }
    @Override
    public int updateCount(Map<String, String> map) {
        return articleMapper.updateCount(map);
    }

}
